<template>
  <div class="grey_bg">
    <navigate>{{ calcParamsType == 1 ? '近况自评表' : '近况自评表更新'}}</navigate>
    <div class="main_content">
      <template v-if="calcParamsType == 1">
        <div></div>
      </template>
      <template v-else>
        <div class="update_time">
          <img class="update_img" src="@/assets/images/common/update.png" alt />
          <div class="update_text">最近更新于：{{create_time}}</div>
        </div>
      </template>

      <div class="inner_title">
        <img class="deraction_img" src="@/assets/images/common/bar.png" alt />
        <div>请根据实际情况，如实填写：</div>
      </div>
      <div class="assessment_box">
        <self-assessment @updateTime="updateTime"></self-assessment>
      </div>
    </div>
  </div>
</template>
  
  <script>
import selfAssessment from "@/views/core/selfAssessment.vue";
export default {
  data() {
    return {
      create_time: ""
    }
  },
  components: {
    "self-assessment": selfAssessment
  },
  computed: {
    // 1新增 2编辑
    calcParamsType() {
      return this.$route.params.type || 1;
    },
    calcParamsId() {
      return this.$route.params.id || 0;
    }
  },
  methods: {
    updateTime(time) {
      this.create_time = time;
    }
  }
};
</script>
  
  <style scoped>
.update_time {
  display: grid;
  grid-template-columns: 17.36px auto;
  gap: 8.68px;
  padding: 13.89px 17.36px;
  box-sizing: border-box;
  background: rgba(0, 174, 255, 1);
}
.update_img {
  width: 17.36px;
  height: inherit;
}
.update_text {
  font-size: 14.58px;
  font-family: Microsoft YaHei, Microsoft YaHei-Regular;
  font-weight: 400;
  color: #ffffff;
  line-height: 17.36px;
}
.grey_bg {
  background: #f4f6fa;
  overflow-y: hidden !important;
}
.main_content {
  height: calc(100% - 60px);
  overflow-y: auto;
  padding-bottom: 10.42px;
  box-sizing: border-box;
  display: grid;
  gap: 10.42px;
  align-content: flex-start;
}
.inner_title {
  font-size: 15.97px;
  font-family: Microsoft YaHei, Microsoft YaHei-Regular;
  font-weight: bold;
  text-align: left;
  color: #333333;
  display: flex;
  align-items: center;
  gap: 10.42px;
  padding: 7.64px 17.36px 7.64px 17.36px;
  box-sizing: border-box;
}
.deraction_img {
  height: 15.97px;
}
.assessment_box {
  padding: 0 10.42px;
  box-sizing: border-box;
}
</style>